class RemoveCompanyRefAndAddRelationTable < ActiveRecord::Migration
  def self.up
    remove_column :complaints, :company_id
    create_table :companies_complaints do |t|
      t.references :company
      t.references :complaint
    end
  end

  def self.down
    remove_column :complaints, :company_id
    drop_table :companies_complaints
  end
end
